/**
 * Created by Administrator on 2016/7/12 0012.
 */
 var slide_len = $(".slide").length;
 var slideW;
 slide_len>2?slideW=500:slideW=400;
$(document).ready(function(){
    $(".slider4").bxSlider({
        slideWidth: slideW,
        minSlides: 3,
        maxSlides: 3,
        moveSlides: 1,
        startSlide: 1,
        slideMargin: 10,
    });
});
//系统客户信息完善
$('#customers').click(function(){
	$('.kexin').show()
})

//客服通话状态查询
$(".header_state span").click(function(){
    $(".header_state ul").css("display","block")
})
$(".header_state li").click(function(){
    $(".header_state>ul").css("display","none")
})
//来电查询
var bac=true;
$(".severs").click(function(){
    if(bac==true){
        $(".severs").css("backgroundColor","#55a1f6");
        $(this).find('span').addClass("arrows_top");
        $(".Screen_PopUp").slideToggle();
        bac=false;
    }
    else if(bac==false){
        $(".severs").css("backgroundColor","#55a1f6");
        $(this).find('span').removeClass("arrows_top");
        $(".Screen_PopUp").slideToggle();
        bac=true;
    }
})
//登陆状态
   window.onload=function(){
        $(".header_state>p>a").html("离开");
        if($(".header_state>p>a").html()=="离开"){
         //   $(".tab tbody tr td").html(" ");
            $(".client_information .btn").css("display","none");
            $(".slide div p").css("display","none");
        }
       $(".header_state ul .zhuangtai").click(function(){
           if($(".header_state .zhuangtai a").html()=="签出"){
               $(".header_state>p>a").html("离开");
               $(".header_state ul .zhuangtai a").html("签入");
            
           }
           else if ($(".header_state ul .zhuangtai a").html() == "签入") {
                $(".header_state>p>a").html("空闲");
                $(".header_state ul .zhuangtai a").html("签出");
                $(".client_information .btn").css("display","block");
                $(".slide div p").css({"display":"block"});
            }

       })
       
};


// 三方通话
$(".three-party").click(function(){
    $(".conference").css("display","block");
    $(".mask").css("display","block");
});
$(".turnoff").click(function(){
    $(this).parent().css("display","none");
    $(".mask").css("display","none");
})
// 转接
$(".adapter").click(function(){
    $(".through_connection").css("display","block");
    $(".mask").css("display","block");
})

// 左侧导航

   $('.Screen_PopUp li').click(function(){
       $('.Screen_PopUp li a').removeClass("arrows_active");
       $('.Screen_PopUp li span').removeClass("arrows");
       $(this).find('a').addClass("arrows_active");
       $(this).find('span').addClass("arrows");
   })


window.onload=function(){
  $(".kuan").mouseover(function(){
    $(".bx-prev,.bx-next").show();
  });
  $(".kuan").mouseout(function(){
    $(".bx-prev,.bx-next").hide();
  })
  $(".bx-prev,.bx-next").mouseover(function(){
    $(this).show();
  })
}